# import requests
# from bs4 import BeautifulSoup

# url = 'https://www.bilibili.com/video/BV1814y1S7Kq/?spm_id_from=333.1007.tianma.2-1-4.click'

# # 发送请求
# response = requests.get(url)

# # 解析HTML
# soup = BeautifulSoup(response.text, 'html.parser')

# # 获取视频标题
# title = soup.find('span', class_='tit').text.strip()

# # 获取视频描述
# desc = soup.find('div', class_='video-desc').text.strip()

# # 获取视频播放量
# play_count = soup.find('span', class_='view').text.strip()

# # 获取视频弹幕数
# danmu_count = soup.find('span', class_='dm').text.strip()

# # 获取视频点赞数
# like_count = soup.find('span', class_='like').text.strip()

# # 输出结果
# print('标题：', title)
# print('描述：', desc)
# print('播放量：', play_count)
# print('弹幕数：', danmu_count)
# print('点赞数：', like_count)



# aa={'id': '1', 'pinSel': '0', 'PF': []}
# if aa.get('PF'):
#     print(1111111)


# from docx import Document
# from vsdx import Document, Page, Shape

# # 创建一个新的.vsdx文件
# doc = Document()

# # 添加一个页面
# page = Page(name="Page 1")
# doc.add_page(page)

# # 添加一个矩形
# rect = Shape(name="Rectangle", x=1, y=1, width=2, height=1)
# page.add_shape(rect)

# # 添加一个文本框
# text = Shape(name="Text", x=2, y=2, width=2, height=1)
# text.text = "Hello, World!"
# page.add_shape(text)

# # 保存.vsdx文件
# doc.save("example.vsdx")

# import visiopy

import itertools

# lst = [1, 2, 3]
# combs = itertools.combinations(lst, 2)
# perms = itertools.permutations(lst,2)

# print(list(combs))
# print(list(perms))

# std_psw = '3562'
# for i in itertools.permutations(range(10),4):
#     if ''.join(map(str,i)) == std_psw:
#         print(''.join(map(str,i)))
#         break

# import traceback

# people = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J']
# group_size = 2
# num=0
# for group in itertools.combinations(people, group_size):
#     # print(set(people))
#     # print(group)
#     rest = set(people) - set(group)
#     for group1 in itertools.combinations(rest, group_size):
#         rest1=set(rest) - set(group1)
#         for group2 in itertools.combinations(rest1, group_size):
#             rest2=set(rest1) - set(group2)
#             for group3 in itertools.combinations(rest2, group_size):
#                 rest3=set(rest2) - set(group3)
#                 num+=1
#                 # print(group,group1,group2,group3,rest3)
# print(num)

# import time
# import threading

# def thread1(i):
#     time.sleep(3)
#     print('No. printed by Thread 1: %d' %i)

# def thread2(i):
#     time.sleep(2)
#     print('No. printed by Thread 2: %d' %i)

# if __name__ == '__main__':
#     t1 = threading.Thread(target=thread1, args=(10,))
#     t2 = threading.Thread(target=thread2, args=(12,))
#     t1.start()
#     t2.start()
#     print("No. of active threads: " + str(threading.active_count()))
#     t1.join()
#     t2.join()
    # @classmethod
    # def tostring(cls):
    #     print('Student Class Attributes: name=',cls)

# class Student(object):
#     name = 'test_unknown' # class attribute
#     def __init__(self):
#         self.age = 20  # instance attribute
#         print('1111111111')
    
#     @classmethod
#     def tostring(cls):
#         print('Student Class Attributes: name=',cls.age)

# Student.tostring()
# # print(Student.name)

# std = Student()
# std.tostring()


# class Employee:
#     def __new__(cls):
#         print ("__new__ magic method is called")
#         # inst = object.__new__(cls)
#         # return inst
#     def __init__(self):
#         print ("__init__ magic method is called")
#         self.name='Satya' 
# Employee()


# class Employee:
#     def __init__(self):
#         self.name='Swati'
#         self.salary=10000
#     def __str__(self):
#         return 'name='+self.name+' salary=$'+str(self.salary) 

# e1=Employee()
# print(e1)

# a_list = [4,5,1,25,9,7]

# class Student:
#     def __init__(self,name):
#         self.__name = name
#     @property
#     def name(self):
#         self.__name = 'lk'+self.__name
#         return self.__name
#     # @name.setter
#     # def name(self,newname):
#     #     self.__name = newname

# std = Student("Swati")
# print(std.name)

class Student:

    def __init__(self, name, age):
        self.name = name  # instance attribute
        self.age = age # instance attribute

    @classmethod
    def getobject(cls):
        return cls('Steve', 25) 

std = Student.getobject()
print(std.name)